Skip to content

fix(tests): add isolated test for Chicago Bulls team condition#570

Merged
lpil merged 1 commit intoexercism:mainfrom
khalidbelk:main
Sep 22, 2025
Merged

fix(tests): add isolated test for Chicago Bulls team condition#570
lpil merged 1 commit intoexercism:mainfrom
khalidbelk:main

Conversation

@khalidbelk
Copy link
Contributor

This PR adds a test case that specifically validates the "Chicago Bulls" condition
in root_for_team() without relying on other passing conditions like former_player status or win/loss ratios.

How to reproduce the issue ? Simply remove the team.name == "Chicago Bulls"in this currently passing Exercism solution and it will have no effect (= they still pass, and all other conditions are explicitely tested except this one) :

pub fn root_for_team(team: Team) -> Bool {
  team.coach.name == "Gregg Popovich" || team.coach.former_player
  || team.name == "Chicago Bulls" || team.stats.wins >= 60
  || team.stats.losses > team.stats.wins
}

@github-actions
Copy link

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Thank you!

@lpil lpil merged commit 7ab25e2 into exercism:main Sep 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants